<template>
  <div class="error">
    <div class="img">
      <img :src="type | getType" alt="">
    </div>
    <div class="desc">
      <p>系统开小差了</p>
      <p>请稍后点击空白处刷新</p>
    </div>
  </div>
</template>

<script>
  export default {
    name: "server-error",
    data() {
      return {
        type: " "
      };
    },
    mounted() {
      this.type = this.$route.params.type;
    },
    filters: {
      getType: function (type) {
        return type == "server" ? "./static/server.png" : "./static/timeout.png"
      }
    }
  }
</script>

<style scoped lang="scss">
  .error {
    width: 100%;
    height: 100%;
    .img {
      margin-top: 4.06rem;
      text-align: center;
      img {
        width: 5.08rem;
      }
    }
    .desc {
      margin-top: 0.57rem;
      text-align: center;
      font-size: 0.3rem;
      line-height: 0.56rem;
      p {
        color: #999;
      }
    }
  }
</style>
